home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Minimized Application"
- ClientHeight = 3330
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 4605
- Height = 3735
- Left = 1035
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3330
- ScaleWidth = 4605
- Top = 1140
- Width = 4725
- WindowState = 1 'Minimized
- Begin MsgHook MsgHook
- Left = 180
- Top = 225
- End
- Option Explicit
- ' We want to catch WM_QUERYOPEN
- Const WM_QUERYOPEN = &H13
- Sub Form_Load ()
- ' Ensure minimized state (could also be set at design
- ' time). Set MinButton and MaxButton to False at
- ' design time for cleaner control menu.
- Me.WindowState = 1 'Minimized
- ' Setup MsgHook
- MsgHook.HwndHook = Me.hWnd
- MsgHook.Message(WM_QUERYOPEN) = True
- End Sub
- Sub MsgHook_Message (Msg As Integer, wParam As Integer, lParam As Long, Result As Long)
- ' Prevent icon from restoring by returning 0.
- ' No need to invoke default window procedure.
- If Msg = WM_QUERYOPEN Then
- Result = 0
- End If
- End Sub
-